remove a few old kludges that are no longer needed. (#691)
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Sat, 13 Feb 2021 16:09:58 +0000 (09:09 -0700)
committerGitHub <noreply@github.com>
Sat, 13 Feb 2021 16:09:58 +0000 (09:09 -0700)
* remove a few old kludges that are no longer needed.

* clean up upgrade a bit

"GPSBabel Version " doesn't need to be removed from currentVersionIn
in UpgradeCheck::checkForUpgrade,
that is taken care of in MainWindow::findBabelVersion

gui/preferences.cc
gui/upgrade.cc
gui/upgrade.h
kml.cc

index 15e5df086744afcc7e552d4f02734101ee40a1bd..f37c91d7638e03d3b50744c5f56361c6be549826 100644 (file)
@@ -18,7 +18,6 @@
 
 
 #include "preferences.h"
-#include "../gbversion.h"
 
 class FormatListEntry : public QListWidgetItem
 {
@@ -44,10 +43,6 @@ Preferences::Preferences(QWidget* parent, QList<Format>& formatList,
   ui_.startupCheck->setChecked(babelData_.startupVersionCheck_);
   ui_.reportStatisticsCheck->setChecked(babelData_.reportStatistics_);
   ui_.ignoreVersionMismatchCheck->setChecked(babelData_.ignoreVersionMismatch_);
-  // Because of an unfortunate bug in 1.4.0, we turn this off in 1.4.1.
-  if (VERSION == QString("1.4.1")) {
-    babelData_.ignoreVersionMismatch_ = false;
-  }
 
   connect(ui_.buttonBox, &QDialogButtonBox::accepted, this, &Preferences::acceptClicked);
   connect(ui_.buttonBox, &QDialogButtonBox::rejected, this, &Preferences::rejectClicked);
index bb6bf902f0a8cc2e6f3eeb6d067b8221b59eee9c..ecb796ce7c5fae0b9625462f1216c8cde073f001 100644 (file)
@@ -101,12 +101,11 @@ UpgradeCheck::updateStatus UpgradeCheck::checkForUpgrade(
   bool allowBeta)
 {
   currentVersion_ = currentVersionIn;
-  currentVersion_.remove("GPSBabel Version ");
 
   QDateTime soonestCheckTime = lastCheckTime.addDays(1);
   if (!testing && QDateTime::currentDateTime() < soonestCheckTime) {
     // Not time to check yet.
-    return UpgradeCheck::updateUnknown;
+    return updateUnknown;
   }
 
   manager_ = new QNetworkAccessManager;
@@ -164,7 +163,7 @@ UpgradeCheck::updateStatus UpgradeCheck::checkForUpgrade(
 
   replyId_ = manager_->post(request, args.toUtf8());
 
-  return UpgradeCheck::updateUnknown;
+  return updateUnknown;
 }
 
 QDateTime UpgradeCheck::getUpgradeWarningTime()
index a6c90a62e2fd41d253632314ef3959baaf764238..64f07f76a539c55427cc53a6a2c3cf4c0e58b5ab 100644 (file)
@@ -38,11 +38,11 @@ public:
   UpgradeCheck(QWidget* parent, QList<Format>& formatList, BabelData& bd);
   ~UpgradeCheck();
 
-  typedef enum {
+  enum updateStatus {
     updateUnknown,
     updateCurrent,
     updateNeeded,
-  } updateStatus;
+  };
 
   UpgradeCheck::updateStatus checkForUpgrade(const QString& babelVersion,
       const QDateTime& lastCheckTime,
diff --git a/kml.cc b/kml.cc
index 12ad2e2ff4cb3550ba88e732961b496d054267dd..fbcafba0775ed90252308f36c165d6d5de2074ce 100644 (file)
--- a/kml.cc
+++ b/kml.cc
@@ -1755,11 +1755,6 @@ void KmlFormat::write()
   precision = atol(opt_precision);
 
   writer->writeStartDocument();
-  // FIXME: This write of a blank line is needed for Qt 4.6 (as on Centos 6.3)
-  // to include just enough whitespace between <xml/> and <gpx...> to pass
-  // diff -w.  It's here for now to shim compatibility with our zillion
-  // reference files, but this blank link can go away some day.
-  writer->writeCharacters(QStringLiteral("\n"));
 
   writer->setAutoFormatting(true);